home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / DEMON / UTILS / BASE64.ZIP / !base64 / !Help < prev    next >
Text File  |  1994-11-14  |  6KB  |  122 lines

  1.  
  2.                                  !base64
  3.                                  =======
  4.                                version 0.03
  5.  
  6. !base64 is a simple utility which can be used to decode base64 encoded files
  7. received as part of an email message. When run it will install an icon on
  8. the icon bar.
  9.  
  10. !base64 does not make any attempt whatsoever to actually find the part, or
  11. parts, of the email containing the base64 encoded file. That is up to you.
  12.  
  13. So before trying to decode the file you will need to load the message into
  14. an editor, such as !Edit and select the base64 encoded part. Ensure that you
  15. select all of it and *nothing more* than all of it. Failing to do this will
  16. likely result in 'end of file' errors when !base64 attempts to decode the
  17. file. In fact it doesn't matter if you select extra blank lines or spaces at
  18. the start the encoded file, since the decoding process will ignore them.
  19.  
  20. Once you have selected the encoded part of your email you can, if you like,
  21. save it to disc though this isn't really necessary since !base64 can accept
  22. files saved to it directly from !Edit.
  23.  
  24. To decode your selection drag it onto the !base64 icon on the icon bar. A
  25. dialogue box similar to a standard 'Save' box will open. Note that !base64
  26. will only recognise 'text' files. Files with of any other type will be
  27. ignored.
  28.  
  29. The save box contains a 'write' as text switch. You should turn this on if
  30. you know that the encoded file is encoded text. If you it is encoded data,
  31. an application or you're not sure what it is leave this switch off. There's
  32. more info on this switch below.
  33.  
  34. Now to decode the file, enter a file name in the box and either drag the
  35. file icon to a directory display. You can also drag it directly to an editor
  36. such as !Edit if you wish. If all goes well, after a few seconds !base64
  37. will have saved the decoded file. If you get 'end of file' errors then
  38. either the file was badly encoded or you made your selection badly.
  39.  
  40. If the file was encoded text you may find that there are 'funny' characters
  41. in it. This means that it uses a character set such as that from a PC or a
  42. Mac. Try giving it to !Wombat and trying different types of character set
  43. conversion.
  44.  
  45. If the file was encoded data then you may need to set the file-type before
  46. you can use the decoded file.
  47.  
  48. Errors during decoding
  49. ----------------------
  50.  
  51. If 'end of file' is reached during decoding then an error is reported
  52. telling you that the destination file may be corrupt. This is not
  53. necessarily so -- you may simply have selected some blank lines beyond the
  54. end of the encoded part of the email. However, the error may be caused by
  55. your not having selected the entire encoding, by the file not being
  56. correctly encoded or by it having being corrupted during transmission.
  57.  
  58. If errors other than 'end of file' are encountered during decoding then
  59. decoding ceases immediately, the error is reported and the part of the
  60. destination file created so far will be deleted if possible.
  61.  
  62.  
  63.  
  64. The 'Save as text' switch
  65. -------------------------
  66. One of the specifications for base64 encoding is that when encoding *text*
  67. files all line-breaks in the source file are converted to CR-LF
  68. (Return-Linefeed) before encoding. This is to ensure consistency between
  69. different platforms.
  70.  
  71. If you leave the 'Save as text' switch off then any CRs in the decoded file
  72. will be written to the destination file. You will then probably want to
  73. remove them when the text is loaded into your editor. Turning the 'Save as
  74. text' switch on means that you won't need to do this -- any decoded CRs will
  75. simply be ignored, leaving you with just the LFs (which is the Archimedes
  76. line feed convention).
  77.  
  78. If the encoded file contains data or an application then ensure that the
  79. 'Save as text' switch is off when decoding. This tells the decoder not to
  80. ignore decoded CRs. The decoded file will then be exactly the same as the
  81. original.
  82.  
  83. !base64 saves decoded files with file-type 'Text' if the switch is on and
  84. with file-type 'Data' if the switch is off.
  85.  
  86. If you received the base64 encoding as part of a MIME message then the
  87. 'Content-Type' field in the header will indicate whether or not it is
  88. encoded text. Note though that if the 'Content-Type' in the main message
  89. header is 'Multipart' then each individual part will have its own
  90. 'Content-Type' header which will indicate what it contains. If the header
  91. says 'Text/XXXX' then it is almost certainly OK to decode with the switch
  92. on. If the 'Content-Type' is, for the whole message or a part, is missing
  93. then the encoding contains plain text (that's the default).
  94.  
  95. Multipart emails will contain a 'Boundary' sub-field in the 'Content-type'
  96. field of the main header. Each separate part of the message starts and ends
  97. with this string (prefixed with '--'). You can use the boundary string to
  98. search for the beginning and end of encoded parts if you wish. Note that
  99. boundaries can be 'nested' though.
  100.  
  101. Eventually, this app may turn into a full blown MIME interpreter. Until that
  102. happy day, it's better than nothing!
  103.  
  104.  
  105. Limitations
  106. ===========
  107. One obvious limitation is that the program does not search the message for
  108. base64 encoded parts. I may get around to doing that one day. The real
  109. answer to this is to ask folks not to send the messages in the first place.
  110.  
  111. !base64 can only decode 'base64' encoded messages, or those parts of
  112. multipart messages which are encoded using base64. These are indicated by a
  113. header field (either for the entire message or for any base64 encoded parts
  114. in multipart messages) reading 'Content-Transfer-Encoding: Base64'.
  115.  
  116. !base64 cannot decode any other type of encoding, such as 'quoted-printable'.
  117.  
  118. -- 
  119. Pete
  120. ====
  121. 14/11/94
  122.